//
//  FreshProductCollectionViewCell.m
//  Youhuiju
//
//  Created by yutenys on 16/8/1.
//  Copyright © 2016年 yutenys. All rights reserved.
//

#import "FreshProductCollectionViewCell.h"

@interface FreshProductCollectionViewCell ()

@property (weak, nonatomic) IBOutlet UIImageView *goodsImg;
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
@property (weak, nonatomic) IBOutlet UILabel *saleCountLabel;
@property (weak, nonatomic) IBOutlet UILabel *priceLabel;


//适配
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *imgHig;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *titleLabelTop;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *saleCountLabelTop;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *priceLabelTop;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *saleCountLabelHig;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *iconHig;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *priceLabelHeight;

@property (weak, nonatomic) IBOutlet NSLayoutConstraint *addCartBtnTrailing;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *addCartBtnBottom;

@property (weak, nonatomic) IBOutlet NSLayoutConstraint *addCartWid;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *addCartHig;

@property (weak, nonatomic) IBOutlet NSLayoutConstraint *titleLabelLeading;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *titleLabelTrailing;


@end


@implementation FreshProductCollectionViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    
    
    self.imgHig.constant = 156 * FitH;
    
    self.titleLabelTop.constant = 8 * FitH;
    
    self.titleLabel.font = [UIFont systemFontOfSize:11 * FitH];
    
    self.titleLabelLeading.constant = 6 * FitW;
    self.titleLabelTrailing.constant = 6 * FitW;
    
    self.saleCountLabelTop.constant = 8 * FitH;
    
    self.priceLabelTop.constant = 7 * FitH;
    
    self.saleCountLabelHig.constant = 9 * FitH;
    
    self.iconHig.constant = 9 * FitH;
    
    self.priceLabelHeight.constant = 9 * FitH;
    
    self.addCartBtnBottom.constant = 8 * FitH;
    
     self.addCartBtnTrailing.constant = 8 * FitW;
    
    self.addCartHig.constant = 20 * FitH;
    self.addCartWid.constant = 35 * FitW;
    
    
}
- (IBAction)addCartAction:(UIButton *)sender {
    
    DLog(@"加入购物车成功");
}

@end
